package object_oriented;

public class ArrayHelper {
    public static boolean equal( int[] first , int[] second ) {         //判断两个int类型数组是否相等
        if ( first.length == second.length ){
            for (int i = 0; i < first.length; i++) {
                if ( first[i] != second[i]){
                    return false ;
                }
            }
            return true ;
        }else {
            return false ;
        }
    }
    public static boolean equal( char[] first , char[] second ) {       //判断两个char类型数组是否相等
        if ( first.length == second.length ){
            for (int i = 0; i < first.length; i++) {
                if ( first[i] != second[i]){
                    return false ;
                }
            }
            return true ;
        }else {
            return false ;
        }
    }
}
